<?php
  include "rphp/All.php";

  class MyApplication extends Application {
    public $abt;
    public $menu;
    public $login;
    function init() {
      
      $this->abt = new Dialog('abt');
      $this->abt->setBounds(10, 400, 300, 150);
      $this->addActionListener($this->abt);
      
      $this->menu = new Menu('menu');
      $this->menu->setStyle("width",$this->width);
      $this->menu->setItems(array("Login","About","Help"));
      $this->add($this->menu);

      $this->login = new Login('login');
      $this->addActionListener($this->login);      
      

    }
    function actionPerformed($action) {
      if($action['component'] == "menu") {  
            if($action['action'] == "Login") {
                $this->login->show('mainwindow');
            } else {
                $this->abt->setInfo($action['action']);
                $this->abt->show('mainwindow');
            }
      }        
    }
  }

 $obj = new MyApplication();      
?>
